package org.sk.gsync.app.utils.file;

import java.io.File;
import java.io.FileFilter;

public class DirFilterWatcher implements FileFilter {
    private final String filter;

    public DirFilterWatcher() {
        filter = "";
    }

    public DirFilterWatcher(final String filter) {
        this.filter = filter;
    }

    public boolean accept(final File file) {
        if ("".equals(filter)) {
            return true;
        }
        return (file.getName().endsWith(filter));
    }
}
